$(function () {


})


var handlerMessage= function (data){
    if(data.success){
        $.messager.alert("温馨提示:操作成功 3s后自动关闭");
        window.setTimeout(function () {
            //window.location.reload();
            window.location.href="http://localhost:1111/department/list.do";
        },3000)
    }else{
        $.messager.popup(data.msg);
    }
}

var employeeMessage= function (data){
    if(data.success){
        $.messager.alert("温馨提示:操作成功 3s后自动关闭");
        window.setTimeout(function () {
            //window.location.reload();
            window.location.href="http://localhost:1111/employee/list.do";
        },3000)
    }else{
        $.messager.popup(data.msg);
    }
}

var permissionMessage= function (data){
    if(data.success){
        $.messager.alert("温馨提示:操作成功 3s后自动关闭");
        window.setTimeout(function () {
            //window.location.reload();
            window.location.href="http://localhost:1111/permission/list.do";
        },3000)
    }else{
        $.messager.popup(data.msg);
    }
}

var roleMessage= function (data){
    console.log(1)
    console.log(data)
    if(data.success){
        $.messager.alert("温馨提示:操作成功 3s后自动关闭");
        window.setTimeout(function () {
            //window.location.reload();
            console.log(data)
            window.location.href="http://localhost:1111/role/list.do";
        },3000)
    }else{
       // console.log(data)
        $.messager.popup(data.msg);
    }
}

var systemDictionaryItemMessage= function (data){
    console.log(1)
    console.log(data)
    if(data.success){
        $.messager.alert("温馨提示:操作成功 3s后自动关闭");
        window.setTimeout(function () {
            //window.location.reload();
            console.log(data)
            window.location.href="http://localhost:1111/systemDictionaryItem/list.do";
        },3000)
    }else{
        // console.log(data)
        $.messager.popup(data.msg);
    }
}
